<%--

    Выгрузка клиенту остатков товаров с ценами

--%>

<%@page contentType="text/html" %>
<%@page pageEncoding="UTF-8" %>

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<%@taglib prefix="a4j" uri="http://richfaces.org/a4j" %>
<%@taglib prefix="rich" uri="http://richfaces.org/rich" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Goodwill - Выгрузка остатков</title>
    <link rel="stylesheet" href="resources/css/main.css"/>
    <link rel="stylesheet" href="resources/css/stylesheet.css"/>
    <link rel="stylesheet" href="resources/css/clients.css"/>
    <style type="text/css">
    </style>
</head>
<body>
<f:view>
    <jsp:include page="menu.jsp"/>
    <jsp:include page="status.jsp"/>
    <rich:panel header="Выгрузка остатков">
        <h:form prependId="false" id="fRestsExport">
            <h:outputText value="Выгрузить остатки для клиента"/>
            <h:selectOneMenu value="#{RestsExportBean.clientId}" style="width:300px">
                <f:selectItems value="#{RestsExportBean.allClientsAsSelectItems}"/>
            </h:selectOneMenu>
            <a4j:commandButton value="Выгрузить" action="#{RestsExportBean.doExport}" status="none"/>
        </h:form>
    </rich:panel>
    <rich:panel header="Товар на складе" rendered="#{SecurityBean.isRoleAdministrator}">
        <h:panelGrid columns="2">
            <h:outputText value="Вес: "/>
            <h:outputText value="#{RestsExportBean.restsStat.weight} кг" style="font-size: 140%"/>
            <h:outputText value="Объем: "/>
            <h:outputText value="#{RestsExportBean.restsStat.volume} м3" style="font-size: 140%"/>
            <h:outputText value="Всего наименований: "/>
            <h:outputText value="#{RestsExportBean.restsStat.positionsCount}"/>
        </h:panelGrid>
        <h:panelGrid columns="1">
            <h:outputText
                    value="Для некоторых товаров не указан вес! (#{RestsExportBean.restsStat.positionsWithoutWeightCount} шт.)"
                    rendered="#{RestsExportBean.restsStat.positionsWithoutWeightCount > 0}"
                    style="font-size: 80%;color:red;">
            </h:outputText>
            <h:outputText value="#{RestsExportBean.restsStat.positionsWithoutWeightString}"
                          style="font-size: 80%;color:#696969;"/>
            <h:outputText
                    value="Для некоторых товаров не указан объем! (#{RestsExportBean.restsStat.positionsWithoutVolumeCount} шт.)"
                    rendered="#{RestsExportBean.restsStat.positionsWithoutVolumeCount > 0}"
                    style="font-size: 80%;color:red;">
            </h:outputText>
            <h:outputText value="#{RestsExportBean.restsStat.positionsWithoutVolumeString}"
                          style="font-size: 80%;color:#696969;"/>
        </h:panelGrid>
    </rich:panel>
</f:view>
</body>
</html>
